package com.skilltrackedu.exception.enums;


import com.skilltrackedu.exception.ErrorInfo;

/**
 * 认证错误枚举
 */
public enum AuthError implements ErrorInfo {
    UNAUTHORIZED("用户认证失败"),
    FORBIDDEN("权限不足"),
    UNAUTHORIZED_TOKEN("token认证失败"),
    UNAUTHORIZED_TOKEN_EXPIRED("token已过期"),
    UNAUTHORIZED_TOKEN_INVALID("token无效"),
    UNAUTHORIZED_TOKEN_TYPE_ERROR("token解析失败"),
    UNAUTHORIZED_TOKEN_NOT_EXIST("token不存在"),
    UNAUTHORIZED_TOKEN_REFRESH_FAILED("token刷新失败"),
    UNAUTHORIZED_NOT_LOGGED_IN("用户未登录"),
    USER_FROZEN("用户被冻结"),
    INVALID_TOKEN("无效的token");

    private String errMessage;

    AuthError(String errMessage) {
        this.errMessage = errMessage;
    }

    // 获取错误信息的方法
    public String getErrMessage() {
        return errMessage;
    }
}
